<%-- 
    Document   : mensaje
    Created on : 22/10/2008, 08:01:04 AM
    Author     : Lizardo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%
            boolean estado = (request.getAttribute("r_cerrar") == null) ? false : (Boolean) request.getAttribute("r_cerrar");
            String icono = (request.getAttribute("icono") == null) ? "" : (String)request.getAttribute("icono");
            String mensaje = (request.getAttribute("r_mensaje") == null) ? "" : (String)request.getAttribute("r_mensaje");
            String msg = (request.getParameter("r_msg") == null) ? "" : request.getParameter("r_msg");
            boolean estilo = (request.getAttribute("r_estilo") == null) ? true : false;
            String cssAdmin = (estilo) ? "../dinamica/css/admin_1.css" : "dinamica/css/admin_1.css";
            String cssAlumno = (estilo) ? "../dinamica/css/alumno.css" : "dinamica/css/alumno.css";
            String imgIcono = (icono.compareTo("info") == 0) ? "dinamica/img/info.gif" : (icono.compareTo("error") == 0) ? "dinamica/img/delete.png" : "";
            
            if (mensaje.compareTo("") == 0) {
                mensaje = msg;
            }
            String msg1 = (String)request.getAttribute("r_msg1");
            String msg2 = (String)request.getAttribute("r_msg2");
            String msg3 = (String)request.getAttribute("r_msg3");
            String msg4 = (String)request.getAttribute("r_msg4");
            String msg5 = (String)request.getAttribute("r_msg5");
            String msg6 = (String)request.getAttribute("r_msg6");
            mensaje = (mensaje == null) ? "Ninguno" : mensaje;
            if (mensaje.compareTo("Ninguno") == 0) {
                mensaje = (String) session.getAttribute("s_mensaje");
            }
            int i = 0;
        %>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="<%= cssAdmin %>" rel="stylesheet" type="text/css" />
        <link href="<%= cssAlumno %>" rel="stylesheet" type="text/css" />
        <title>Mensaje</title>
    </head>
    <body>
        <h2>Mensaje del Servidor</h2>
        <font color="red">
            <center>
                <table width="100%" cellpadding="2" cellspacing="2">
                    <tr>
                        <td width="4%" colspan="2">
                            <img src="<%= imgIcono %>" width="30" height="30"/>
                        </td>
                        <!--td width="2%">&nbsp;</td-->
                        <td width="96%" colspan="2"><b>Mensaje: <%= mensaje%></b></td>
                    </tr>
                    <!--tr>
                        <td colspan="3">&nbsp;</td>
                    </tr-->
                    <% if (msg1 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right"><%= i%>.-&nbsp;</td>
                        <td><%= msg1%> &nbsp;</td>
                    </tr>
                    <% } 
                       if (msg2 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right">2.-&nbsp;</td>
                        <td><%= msg2%> &nbsp;</td>
                    </tr>
                    <% }
                       if (msg3 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right">3.-&nbsp;</td>
                        <td><%= msg3%> &nbsp;</td>
                    </tr>
                    <% }
                       if (msg4 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right">4.-&nbsp;</td>
                        <td><%= msg4%> &nbsp;</td>
                    </tr>
                    <% }
                       if (msg5 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right">5.-&nbsp;</td>
                        <td><%= msg5%> &nbsp;</td>
                    </tr>
                    <% } 
                       if (msg6 != null) { i++; %>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="right">6.-&nbsp;</td>
                        <td><%= msg6%> &nbsp;</td>
                    </tr>
                    <% } %>
                </table>
            </center>
        </font>
        
        <br><br>
        
        <a href="javascript:window.history.back()">Retornar</a>
        &nbsp;&nbsp;
        <% if (estado) { %>
            <a href="Control?pagina=cerrarSesion">Cerrar sesión</a>
        <% } %>
    </body>
</html>
